package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.zzw.TEmphasisPeople;
import com.ruoyi.common.core.domain.zzw.TEventManage;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableSupport;
import com.ruoyi.system.domain.vo.CountVO;
import com.ruoyi.system.domain.vo.DisposeStatusVO;
import com.ruoyi.system.domain.vo.WarningLevelVO;
import com.ruoyi.system.mapper.TEventManageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TEmphasisPeopleMapper;
import com.ruoyi.system.service.ITEmphasisPeopleService;

/**
 * 重点人员Service业务层处理
 *
 * @author ruoyi
 * @date 2023-11-15
 */
@Service
public class TEmphasisPeopleServiceImpl extends ServiceImpl<TEmphasisPeopleMapper, TEmphasisPeople> implements ITEmphasisPeopleService {
    @Autowired
    private TEmphasisPeopleMapper tEmphasisPeopleMapper;

    /**
     * 查询重点人员
     *
     * @param cPeopleId 重点人员主键
     * @return 重点人员
     */
    @Override
    public TEmphasisPeople selectTEmphasisPeopleByCPeopleId(Long cPeopleId) {
        return tEmphasisPeopleMapper.selectTEmphasisPeopleByCPeopleId(cPeopleId);
    }

    /**
     * 查询重点人员列表
     *
     * @param tEmphasisPeople 重点人员
     * @return 重点人员
     */
    @Override
    public List<TEmphasisPeople> selectTEmphasisPeopleList(TEmphasisPeople tEmphasisPeople) {
        return tEmphasisPeopleMapper.selectTEmphasisPeopleList(tEmphasisPeople);
    }

    /**
     * 新增重点人员
     *
     * @param tEmphasisPeople 重点人员
     * @return 结果
     */
    @Override
    public int insertTEmphasisPeople(TEmphasisPeople tEmphasisPeople) {
        return tEmphasisPeopleMapper.insertTEmphasisPeople(tEmphasisPeople);
    }

    /**
     * 修改重点人员
     *
     * @param tEmphasisPeople 重点人员
     * @return 结果
     */
    @Override
    public int updateTEmphasisPeople(TEmphasisPeople tEmphasisPeople) {
        return tEmphasisPeopleMapper.updateTEmphasisPeople(tEmphasisPeople);
    }

    /**
     * 批量删除重点人员
     *
     * @param cPeopleIds 需要删除的重点人员主键
     * @return 结果
     */
    @Override
    public int deleteTEmphasisPeopleByCPeopleIds(Long[] cPeopleIds) {
        return tEmphasisPeopleMapper.deleteTEmphasisPeopleByCPeopleIds(cPeopleIds);
    }

    /**
     * 删除重点人员信息
     *
     * @param cPeopleId 重点人员主键
     * @return 结果
     */
    @Override
    public int deleteTEmphasisPeopleByCPeopleId(Long cPeopleId) {
        return tEmphasisPeopleMapper.deleteTEmphasisPeopleByCPeopleId(cPeopleId);
    }

    @Override
    public List<CountVO> groupByHighTag() {
        return tEmphasisPeopleMapper.groupByHighTag();
    }

    @Override
    public DisposeStatusVO disposeCount() {
        return tEmphasisPeopleMapper.disposeCount();
    }

    @Override
    public Page<TEmphasisPeople> pageEmphasisPeople() {
        PageDomain pageDomain = TableSupport.buildPageRequest();
        Integer pageNum = pageDomain.getPageNum();
        Integer pageSize = pageDomain.getPageSize();
        return this.page(new Page<>(pageNum, pageSize));
    }

    @Override
    public WarningLevelVO waringLevelCount() {
        return tEmphasisPeopleMapper.waringLevelCount();
    }


}
